-
Notifications
You must be signed in to change notification settings - Fork 7
CI workflow for python package publishing #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d905da0
to
6d29e39
Compare
Path.join(base_dir, "bundlex*/priv/shared/precompiled/*/lib") | ||
|> Path.wildcard() | ||
|> Enum.map(fn lib_dir -> | ||
File.ls!(lib_dir) | ||
|> Enum.group_by(&(String.split(&1, ".") |> List.first())) | ||
|> Enum.each(fn {_lib_name, libs} -> | ||
lib_to_symlink_to = | ||
Enum.max_by(libs, &String.length/1) | ||
|
||
libs | ||
|> Enum.filter(&(&1 != lib_to_symlink_to)) | ||
|> Enum.map(fn lib_to_replace -> | ||
lib_to_replace_path = | ||
Path.join(lib_dir, lib_to_replace) | ||
|
||
File.rm_rf!(lib_to_replace_path) | ||
File.ln_s!(lib_to_symlink_to, lib_to_replace_path) | ||
end) | ||
end) | ||
end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add a comment
92092ce
to
2e5e322
Compare
python/src/boombox/boombox.py
Outdated
) | ||
|
||
self._download_elixir_boombox_release() | ||
release_path = os.path.join(self._data_dir, "bin", "server") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[NIT] Let's wrap that os.path.join(self._data_dir, "bin", "server")
into some kind of a helper function, I think we use it in several places
python/src/boombox/boombox.py
Outdated
download_url, filename=tarball_path, reporthook=t.update_to | ||
) | ||
|
||
print("Download complete. Extracting...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use logger from the logging
module instead of print
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
0ae50c3
to
0f55603
Compare
0f55603
to
8ffbeb9
Compare
This PR includes the following:
CI workflow
The new jobs are:
Fixed and improved symlink restoring
The restored symlinks now point to correct locations. The symlinks between versioned shared objects of the same library (e.g. libvpx.dylib -> libvpx.11.dylib) are now restored too.
Downloading the elixir Boombox release
Once the Boombox class is instantiated a check is performed if the elixir release of boombox is present on the user's computer (in a default location defined with
platformdirs
package). If not, the release is downloaded from a github release matching the version of the python package.